import { createBrowserRouter, Navigate } from "react-router-dom"
import Main from "../pages/main"
import Home from "../pages/Home"
import Mall from "../pages/Mall"
import User from "../pages/User"
import PageOne from "../pages/Other/PageOne"
import PageTwo from "../pages/Other/PageTwo"

const routes = [
  {
    path: "/", Component: Main,
    children: [
      { path: "/", element: <Navigate to="home" replace /> },
      { path: "home", Component: Home },
      { path: "mall", Component: Mall },
      { path: "user", Component: User },
      {
        path: "other", children: [
          { path: "pageOne", Component: PageOne },
          { path: "pageTwo", Component: PageTwo },
        ]
      },
    ]
  },

]
export default createBrowserRouter(routes)
